﻿
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using ZFine.Domain.Entity;

namespace Logic.Map.Project
{
    public class MemberMap : EntityTypeConfiguration<MemberEntity>
    {
        public MemberMap()
        {
            this.ToTable("Member");
            this.HasKey(t => t.F_Id);
            Property(p => p.F_Id).HasMaxLength(50);
            Property(p => p.F_CreatorUserId).HasMaxLength(50);
            Property(p => p.F_LastModifyUserId).HasMaxLength(50);
            Property(p => p.F_DeleteUserId).HasMaxLength(50);
            Property(p => p.MoneyPrice).HasPrecision(18, 2);
            Property(p => p.XPoint).HasPrecision(18, 2);
            Property(p => p.YPoint).HasPrecision(18, 2);
            //Property(f => f.F_Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            //HasOptional(f => f.MerchantP).WithRequired(l => l.MemberEntity);
            //HasOptional(f => f.MerchantP).WithRequired(l => l.MemberEntity);
        }
    }
}
